//
//  GYDetailsTableViewCell.m
//  Visitor
//
//  Created by x on 2017/9/13.
//  Copyright © 2017年 HLB. All rights reserved.
//

#import "GYDetailsTableViewCell.h"

@interface GYDetailsTableViewCell ()

@property (weak, nonatomic) IBOutlet UILabel *titleLable;
@property (weak, nonatomic) IBOutlet UILabel *contentLable;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *contentLableRightCons;
@property (weak, nonatomic) IBOutlet UIImageView *showImageView;

@end

@implementation GYDetailsTableViewCell

+ (GYDetailsTableViewCell *)cellWithTableView:(UITableView *)tableView {
    
    return [[[NSBundle mainBundle] loadNibNamed:@"GYDetailsTableViewCell" owner:nil options:nil] firstObject];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setTitle:(NSString *)title {
    _title = title;
    
    self.titleLable.text = title;
}

- (void)setContent:(NSString *)content {
    _content = content;
    
    self.contentLable.text = content;
}

- (void)setShow:(BOOL)show {
    _show = show;
    self.showImageView.hidden = show;
    if (show) {
        //调整contentlable的右边距约束
        self.contentLableRightCons.constant = -16;
        [self.contentLable layoutIfNeeded];
    }
}
@end
